﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace farming
{
    /// <summary>
    /// 返回结果
    /// </summary>
    public enum ResultState
    {
        /// <summary>
        /// 成功
        /// </summary>
        [Description("成功")]
        Success = 200,
        /// <summary>
        /// 失败
        /// </summary>
        [Description("失败")]
        Failed = 500,
    }

    /// <summary>
    /// 结果
    /// </summary>
    public class ResultDto
    {
        public virtual ResultState Code { get; set; }
        public string Message { get; set; }
    }

    public class ResultDto<TData> : ResultDto
    {
        public TData Data { get; set; }
    }
}
